<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
	<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
	<title>demo4</title>
	<script type="text/javascript">
		var num1=prompt("请输入数字", 1);
		var num2=prompt("请输入符号", 2);
		var num3=prompt("请输入数字",3 );
		switch(num2){
			case "+":
			var res=num1+num3;
			break;
			case "-":
			var res=num1-num3;
			break;
			case "*":
			var res=num1*num3;
			break;
			case "/":
			var res=num1/num3;
			break;
		}
		document.write("结果等于="+res);
	</script>
</head>
<body>
	
</body>
</html>